package main


/**
yum install httpd -y
curl http://192.168.110.94:81/
ab -n 100 -c 10 192.168.110.94:81/
**/
 
import (
    "fmt"
    "log"
    "net/http"
)
 
func handler(w http.ResponseWriter, r *http.Request) {
    fmt.Fprintf(w, "Hello, World!")
}
 
func main() {
    http.HandleFunc("/", handler)
	
    go func() {
        //log.Fatal(http.ListenAndServe(":9999", nil))
		log.Fatal(http.ListenAndServe("192.168.110.94:81", nil))
    }()
 
    // 主goroutine做其他事情，比如等待程序结束
    select {}
}